package com.huangliusong.order.client;

/**
 * @author huangliusong
 * @since 2018/10/27
 * {@link }
 */

import com.huangliusong.order.dataobject.ProductInfo;
import com.huangliusong.order.dto.CartDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;


@FeignClient(name = "product")
public interface ProductClient {

    @GetMapping("/msg")
    String productMsg();



    @GetMapping("/product/listForOrder")
    List<ProductInfo> listForOrder(@RequestBody List<String> productIdList);


    @PostMapping("/decreaseStock")
    void decreaseStock(@RequestBody List<CartDTO> cartDTOList);




}
